
package net.muhu.domain;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for MusicElements.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p>
 * <pre>
 * &lt;simpleType name="MusicElements">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="noise"/>
 *     &lt;enumeration value="harmony"/>
 *     &lt;enumeration value="melody"/>
 *     &lt;enumeration value="rhythm"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * 
 */
@XmlType(name = "MusicElements")
@XmlEnum
public enum MusicElements {


    /**
     * der gefallene Engel, hat sich selber mächtiger
     *             gemacht
     * 
     */
    @XmlEnumValue("noise")
    NOISE("noise"),
    @XmlEnumValue("harmony")
    HARMONY("harmony"),
    @XmlEnumValue("melody")
    MELODY("melody"),
    @XmlEnumValue("rhythm")
    RHYTHM("rhythm");
    private final String value;

    MusicElements(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static MusicElements fromValue(String v) {
        for (MusicElements c: MusicElements.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}
